package com.cgbl.service.ui

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.cgbl.service.BR
import com.cgbl.service.R
import com.cgbl.service.databinding.AppActivityAddMemberBinding
import com.cgbl.service.vm.AddMemberViewModel
import com.robot.base.base.activity.GLBaseActivity
import com.robot.base.configs.AppConstants

@Route(path = AppConstants.Router.Project.A_ADD_MEMBER)
class AddMemberActivity : GLBaseActivity<AppActivityAddMemberBinding, AddMemberViewModel>() {

    private var selectType = AppConstants.BundleValue.SELECT_MEMBER_TYPE_MANAGER
    override fun initContentView(savedInstanceState: Bundle?): Int =
        R.layout.app_activity_add_member

    override fun initVariableId(): Int = BR.viewModel

    override fun initComponents() {
        addSingleTitleBar("添加人员")
        viewModel.setSelectType(selectType)
    }

    override fun initParam() {
        selectType = intent.getIntExtra(
            AppConstants.BundleKey.SELECT_MEMBER_TYPE,
            AppConstants.BundleValue.SELECT_MEMBER_TYPE_MANAGER
        )
    }
}